package com.migration.model.olddb;

import jakarta.persistence.*;
import lombok.Data;
import java.time.LocalDateTime;
import java.io.Serializable;

/**
 * 节点关联关系表 实体类
 * 表名：ra_node_relation
 * 自动生成的实体类
 */
@Data
@Entity
@Table(name = "ra_node_relation")
public class RaNodeRelation implements Serializable {

    private static final long serialVersionUID = 1L;
    
    /**
     * 主键
     * 主键
     */
    @Id
    @Column(name = "id", nullable = false)
    private Long id;
    
    /**
     * 节点主键
     */
    @Column(name = "node_id", nullable = false)
    private Long nodeId;
    
    /**
     * 关联主键
     */
    @Column(name = "linked_id", nullable = false)
    private Long linkedId;
    
    /**
     * 关联类型（1、偏离 2、化学品 3、去往何处（节点）4、操作 7、步骤）
     * 默认值: 1
     */
    @Column(name = "linked_type", nullable = false)
    private Byte linkedType;
    
    /**
     * 状态（0、初始状态 1、暂无分析）
     * 默认值: 0
     */
    @Column(name = "status")
    private Byte status;
    
    /**
     * 创建时间
     * 默认值: CURRENT_TIMESTAMP
     */
    @Column(name = "create_time", nullable = false)
    private java.time.LocalDateTime createTime;
    
    @Override
    public String toString() {
        return "RaNodeRelation{" +
            "id=" + id +
            ", nodeId=" + nodeId +
            ", linkedId=" + linkedId +
            ", linkedType=" + linkedType +
            ", status=" + status +
            ", createTime=" + createTime +
        '}';
    }
} 